package websocket.socket_;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
import websocket.service.WrjPosService;

/**
 * @author nieruijie
 * @date 2021/12/6 18:15
 */
@Configuration
public class WebSocketConfig {

    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

    @Autowired
    public void socketUserService(WrjPosService wrjPosService){
        WebSocketServer.wrjPosService = wrjPosService;
    }
}
